//
//  MyPlanViewModel.m
//  JiZhuiAn
//
//  Created by Easy.Lin on 16/6/20.
//  Copyright © 2016年 Easy. All rights reserved.
//

#import "MyPlanViewModel.h"
#import "APIService+Training.h"

@interface MyPlanViewModel ()

@property (nonatomic, strong) LoadingRACCommand * getTrainingPlanCommand;
@property (nonatomic, strong) TrainingPlanData * trainingPlanData;

@end

@implementation MyPlanViewModel

- (void)initialize
{
    @weakify(self);
    self.getTrainingPlanCommand = [[LoadingRACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
        @strongify(self);
        return [[[APIService shareService] getWeekTrainingPlan] doNext:^(TrainingPlanData * x) {
            self.trainingPlanData = x;
        }];
    }];
}

@end
